home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-19 | 3.1 KB | 53 lines | [TEXT/pdos] |
- * Just to be sure everybody gets to read all this stuff, let's turn on echo
- set echo on
- *
- * This exec file shows how to build resource forks without having to recompile
- * everything each time you want to add a new resource or change an existing
- * one. This is accomplished by using the "include" (not the "#include", that
- * does something different) option of Rez. We add the line "include rTutor.S16"
- * to the rTutor.new.rez file and then when we compile JUST the "rTutor.new.rez"
- * file, we can COMPLETELY recreate the entire resource fork! Make some changes
- * to the other portions (besides the "include" line) of the rTutor.new.rez
- * file to verify for yourself what's happening. Also, read pages 311 and 312
- * of the "Programming Tools & Interfaces for APW" manual for more details.
- * (those page numbers will change when the new "APW Tools & Interfaces"
- * package starts shipping- check your index when you get the new manual)
- *
- * Since Rez is very similar to C, I'll use conditional compilation to control
- * whether or not the existing resources get brought in. This way, ONE file
- * can be used in TWO different ways. The first way builds with the "-a" flag
- * and simply appends stuff to the existing resource fork and the second way
- * include's the existing stuff, then completely replaces it. I've extended the
- * conditional compilation so that the contents of the app's "About" box will
- * be different based on which method was used.
- * (neat trick, eh?)
- *
- * Here's the first way (using "-a" on the compile line). We'll slam this
- * resource right down on the existing resource fork of the app itself. I'm
- * assuming at this point that you've already run the other MAKE file and have
- * built the entire application already. The "-d doFirstWay" on the command
- * line tells Rez to do the same thing it would do if it saw
- * "#define doFirstWay" in the rez source file itself. I'm using "-d" on the
- * command line so that I don't have to tell you how to edit the file yourself.
- * This also shows how YOU can set up your source code so that different things
- * happen based on certain command line switches (you could use this to control
- * lots of things...)
- *
- compile rtutor.new.rez keep=rtutor.s16 rez=(-a -d doFirstWay)
- *
- * Now, run the app and look at the text in the About box. Then, uncomment out
- * the next line, comment out the "compile rtutor.new.rez ..." ABOVE this line
- * and re-run this script. This time, we have a DIFFERENT macro defined on
- * the command line, so the About box will say something different this time.
- * Since the "-a" flag is NOT being used this time, we'll be completly
- * overwriting the resource fork of the application. We'll "include" all of the
- * existing resources from the "rTutor.rfork" file and changing the text of the
- * AlertWindow by overriding it in this file. If you're lost by all of this,
- * post questions in the appropriate category/topic/folder (cat 14, topic 13 on
- * GEnie and "ADV:Programming Environments:Rez Tutorial" on America Online).
- *
- * (don't forget to remove the "*" at the start of the last line. Otherwise,
- * you'll never see the second way demo'd)
- *
- * compile rtutor.new.rez keep=rtutor.s16 rez=(-d doSecondWay)
-